import request from '@/utils/request'

export const list = function(params){
  return request({
    url: '/material/list',
    method: 'get',
    params: params,
  })
}

export const add = function(params){
  return request({
    url: '/material/add',
    method: 'post',
    data: params,
  })
}


export const editGet = function(params){
  return request({
    url: '/material/edit',
    method: 'get',
    params: params,
  })
}

export const editPost = function(params){
  return request({
    url: '/material/edit',
    method: 'post',
    data: params,
  })
}

export const del = function(params){
  return request({
    url: '/material/del',
    method: 'post',
    data: params,
  })
}

export const NameList = function(params){
  return request({
    url: '/material/material_name',
    method: 'get',
    params: params,
  })
}
export const AllNameList = function(params){
  return request({
    url: '/material/all_material_name',
    method: 'get',
    params: params,
  })
}
